package hu.plusone.eregister.controller;

import hu.plusone.eregister.service.AppService;
import org.springframework.beans.factory.annotation.Autowired;

public abstract class AbstractController {

    protected static final int PAGE_SIZE = 10;

    protected final AppService service;

    public AbstractController(AppService service) {
        this.service = service;
    }

    protected int normalizePage(Integer page) {
        if (page == null || page < 0) {
            page = 0;
        }
        return page;
    }
}
